from AutoOperation.settings import AutoOperationExecutorManager
from tools.loggingConfig import logger
from tools.publicConf import PublisherExecutor


class YouTubePublisherExecutor(PublisherExecutor):
    """
    成品发布
    sina素材任务的执行器
    """

    def __init__(self):
        self.maxThreadSize = 5
        super(self.__class__, self).__init__(maxThreadSize=self.maxThreadSize)

    def publisherEvent(self, model, needPublisherData):
        try:
            # 发布逻辑
            pass
        except Exception as e:
            logger.error(f"{self.executorName} 成品发布出错 {e}")


AutoOperationExecutorManager.registerExecutor(ExecutorClass=YouTubePublisherExecutor)
